<div class="header_menu">
    <div class="container">
        <div class="header-nav clearfix">
            <?php echo $this->partial('shop/layout/headerMenu'); ?>
        </div>
    </div>
</div>
</div>
<div class="container breadcrumbs">
    <a href="<?php echo $this->url('shop'); ?>"><?php echo $this->translate('首页'); ?></a>
    <span class="sep">/</span><span><?php echo $this->translate('虚拟商品'); ?></span>
</div>
<div class="container">
    <div class="uc-full-box">
        <div class="row">
            <div class="span4">
                <?php echo $this->partial('shop/partial/home/leftMenu'); ?>
            </div>
            <div class="span16">
                <div class="xm-line-box uc-box uc-favorite-box">
                    <div class="box-hd">
                        <h3 class="title">
                            <?php echo $this->translate('虚拟商品'); ?>
                        </h3>
                    </div>
                    <div class="box-bd">
                        <?php if ($this->goodsVirtualList->getCurrentItemCount() > 0) { ?>
                            <table class="table table-bordered table-hover" style="margin-top: 15px;">
                                <thead>
                                <tr>
                                    <th width="35%"><?php echo $this->translate('商品名称'); ?></th>
                                    <th width="20%"><?php echo $this->translate('订单编号'); ?></th>
                                    <th width="15%"><?php echo $this->translate('商品数量'); ?></th>
                                    <th width="30%"><?php echo $this->translate('操作'); ?></th>
                                </tr>
                                </thead>
                                <?php foreach ($this->goodsVirtualList as $goodsValue) { ?>
                                    <tr>
                                        <td><?php echo $this->escapeHtml($goodsValue[0]->getGoodsName()); ?></td>
                                        <td><?php echo $goodsValue['orderSn']; ?></td>
                                        <td><?php echo $this->escapeHtml($goodsValue[0]->getBuyNum()); ?></td>
                                        <td>
                                            <?php if($goodsValue[0]->getExpressTime()) { ?>
                                                <a href="<?php echo $this->url('home-order', ['action' => 'viewVirtualGoods', 'id' => $goodsValue[0]->getOrderGoodsId()]); ?>"><?php echo $this->translate('查看商品详情'); ?></a>
                                            <?php } else { ?>
                                                <a href="<?php echo $this->url('home-order', ['action' => 'viewVirtualGoods', 'id' => $goodsValue[0]->getOrderGoodsId()]); ?>"><?php echo $this->translate('付款成功后,卖家发货才能查看'); ?></a>
                                            <?php } ?>
                                        </td>
                                    </tr>
                                <?php } ?>
                            </table>
                            <div>
                                <?php echo $this->paginationControl($this->goodsVirtualList, 'Sliding', 'shop/page', ['route' => 'home-order', 'params' => ['action' => 'orderGoodsVirtual']]); ?>
                            </div>
                        <?php } else { ?>
                            <?php echo $this->translate('暂无虚拟商品!'); ?>
                        <?php } ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>